package com.goods.admin.service;

import com.goods.entity.Admin;
import com.goods.entity.User;
import com.goods.mapper.AdminMapper;
import com.goods.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.Map;

@Service
public class AdminService {
    @Autowired
    private AdminMapper adminMapper;

    public Admin adminLogin(Admin admin) {
        return adminMapper.selectAdminByCase(admin);
    }

    @Transactional
    public void changePwd(Admin admin) {
        adminMapper.updateByPrimaryKey(admin);
    }
}
